/*
 * Query.h
 *
 */

#ifndef QUERY_H_
#define QUERY_H_

#include "../../persistence/hash/HashRecord.h"

class Query : public HashRecord {
private:
	BigInt id;
	BigInt serviceId;
	BigInt userId;
	String request;
	String date;
	String time;
	String response;
	String responseDate;
	String responseTime;
	String hidden;

public:
	Query();
	virtual ~Query();

	Query(const Query& other);
	Query& operator=(const Query& other);

	BigInt getId() const { return id; }
	BigInt getServiceId() const { return serviceId; }
	BigInt getUserId() const { return userId; }
	const String& getRequest() const { return request; }
	const String& getRequestDate() const { return date; }
	const String& getRequestTime() const { return time; }
	const String& getResponse() const { return response; }
	const String& getResponseDate() const { return responseDate; }
	const String& getResponseTime() const { return responseTime; }
	const String& getIsHidden() const { return hidden; }

	void setId(BigInt value) { id = value; }
	void setServiceId(BigInt value) { serviceId = value; }
	void setUserId(BigInt value) { userId = value; }
	void setRequest(const String& value) { request = value; }
	void setRequestDate(const String& value) { date = value; }
	void setRequestTime(const String& value) { time = value; }
	void setResponse(const String& value) { response = value; }
	void setResponseDate(const String& value) { responseDate = value; }
	void setResponseTime(const String& value) { responseTime = value; }
	void setIsHidden(const String& value) { hidden = value; }

	BigInt getHashcode() const { return id; }
	BigInt size() const;
	void serialize(ISerializer& serializer) const;
	void unserialize(IUnserializer& unserializer);
};

#endif /* QUERY_H_ */
